/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVASE Song Huongkang PROJECT
 * All Rights Reserved.
 */

package 练习;
//方法重载的练习
public class test05 {
    public static void main(String[] args) {
        test05 tt = new test05();
        tt.mOL(2);
        tt.mOL(2,6);
        tt.mOL("Person");
        tt.max(2,4);
        tt.max(1.200,3.500);
        tt.max(2.3,5.56,7.62);
    }
    public void mOL(int a){
        System.out.println(a*a);
    }
    public void mOL(int a,int b ){
        System.out.println(a*b);
    }
    public void mOL(String c){
        System.out.println(c);
    }
    public void max(int a,int b){
        if (a>b){
            System.out.println(a);
        }else{
            System.out.println(b);
        }
    }
    public void max(double d1,double d2){
        if (d1>d2){
            System.out.println(d1);
        }else{
            System.out.println(d2);
        }
    }
    public void max(double d1,double d2,double d3){
        if (d1>=d2&&d1>=d3){
            System.out.println(d3);
        }else if (d2>=d1&&d2>=d3){
            System.out.println(d2);
        }else{
            System.out.println(d3);
        }
    }
}


